package com.qf.service.impl;

import com.qf.dao.UserDao;
import com.qf.dao.impl.UserDaoImpl;
import com.qf.pojo.User;
import com.qf.service.UserService;

/**
 * Created by Administrator on 2021/10/21.
 */
public class UserServiceImpl implements UserService {

    private UserDao userDao = new UserDaoImpl();


    @Override
    public boolean checkName(String name) {
        User user = userDao.selectOne(name, null);
        if (user != null)
            return false;//不可用
        return true;
    }

    @Override
    public User login(String name, String pass) {
        return userDao.selectOne(name, pass);
    }
}
